package com.caseProject.puremvc.mediator.states.graphicStates
{
	import com.caseProject.puremvc.mediator.events.GraphicEvent;
	import com.caseProject.puremvc.mediator.gui.Graphic;
	import com.caseProject.puremvc.mediator.gui.StateElement;
	
	import flash.filters.DropShadowFilter;

	public class IdleState implements IGraphicState
	{
		public function IdleState()
		{
		}
		
		public function setVisual(g:Graphic):void
		{
			g.filters = [new DropShadowFilter (4, 45, 0, 0.5)];
		}
		
		public function action(g:Graphic):void
		{
			g.enableDrag = false;
			if (g is StateElement) {
				StateElement (g).enableTransform = false;
			}
			g.dispatchEvent(new GraphicEvent(GraphicEvent.IDLE, null, true));
		}
	}
}